﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using QianJin.Models;
using QianJin.Views.Shared;
using System.Globalization;

namespace QianJin.Views
{
    public class FailOrderedData : BaseViewData
    {
        public Exception Exp { get; set; }
    }

    public class FailOrdered : BaseView<FailOrderedData>
    {
        public string GetOrderHtml()
        {
            return this.Model.User.ToHtmlString();
        }
        public string GetSorryInfo()
        {
            string s = GetString("fo_sorry");
            string mailto = string.Format(CultureInfo.InvariantCulture,
                "mailto:{0}?subject=order", UserInfo.ToMailAddress);

            return string.Format(CultureInfo.InvariantCulture,
                s, mailto, this.Server.HtmlEncode(UserInfo.ToMailAddress));
        }

        public void Page_Load(object sender, System.EventArgs e)
        {
            Shared.Shopping m = (Shared.Shopping)this.Master;
            m.ShoppingStage = ShoppingStageEnum.OrderSuccess;
        }
    }
}
